<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	import="java.util.*, org.itstep.stepup.dal.entities.*"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Projects List</title>
	
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/content/common.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/content/bootstrap.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/content/projects-list.css" />

	<script type="text/javascript" src="<%= request.getContextPath() %>/scripts/lib/jQuery/jquery-1.9.1.min.js"></script>
	
</head>
<body>
	<% List<Project> projects = (List<Project>)request.getAttribute("projects"); %> 
	
	<% for (Project project : projects) { %>
	
	<div class="project-item">
		<div class="hero-unit" style="min-width: 600px;">
			<div class="img-div">
				<img src="data:image/png; base64, <%= project.getPhoto() %>" 
		                border="1" class="project-img"/>
			</div>
			<div>
				<div>
					<div class="author-div" style="text-align:center;">
						<div >
							<img class="author-img" src="<%= request.getContextPath() %>/content/images/ava.png" style="width: 30px;"/>
						</div>
						<div style="font-size: 10px;">
							<a href="<%= request.getContextPath() %>/authors/<%= project.getAuthorId() %>">Vasya Pupkin</a>
						</div>
				</div>
				
				<div class="info-div">
					<div>Name: 
						<%= project.getName() %>
					</div>
			    	<div>Video (link): 
			    		<%= project.getVideoLink() %>
			    	</div>
			    	<div>Budget: 
			    		<%= project.getExpectedBudget() %>
			    	</div>
			    	<div>Uploaded date: 
			    		<%= project.getUploadedDate() %>
			    	</div>
			        <div>Expired date:  
			        	<%= project.getExpireDate() %>
			        </div>
			        <div><a href="http://google.com">details</a> </div>
				</div>
			</div>
			</div>
		</div>		
	 </div>
	
	<% } %>
	
</body>
</html>